{extend name="platform/new_base" /}
  {block name="resources"}
  <style>
	.jconfirm-buttons{
		float: none !important;
		text-align: center !important;
	}
	.v-container{
		background-color: #f5f5f5;
		padding:10px;
		margin-bottom:0px;
		padding-bottom: 0;
	}
    .copyrights{
        margin-top: 0;
    }
</style>
  {/block}

{block name="main"}
				<!-- page -->
			   <div class="flex">
				   <div style="padding-right: 20px;">

					{if $cms_infos}
						<div class="alert alert-tips alert-dismissible" role="alert">
							<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
							<h4 class="alert-tips-title">{$cms_infos.title} <a href="{:__URL('PLATFORM_MAIN/Mail/cmsInfo')}?topic_id={$cms_infos.topic_id}" target="_blank" class="text-primary view_Detail fs-12">查看详情</a></h4>
						</div>
					{/if}

					<!--商城助手-->
					<div class="v-card-body" id="mallGuide">
						<div class="newbie mb-20 flex flex-pack-justify">
							<div class="bold">商城助手</div>
							<div class="pr remove-pr">
								<a href="javascript:void(0);"><i class="icon icon-set"></i></a>
								<div class="remove-pos">
									<div class="remove-arrow">
										<a href="javascript:void(0)" id="remove">永久关闭</a>
									</div>
								</div>
							</div>
						</div>
						<div class="process">
							<div class="procedure">
								<div class="step-number">
									<img src="/public/platform/images/index/1.png" alt="">
									<div class="select">
										<div class="flex">
											<div class="choose">商城基本配置</div>
											<div class="v-tooltip">									
												<span class="tips-box"><i class="icon icon-index-guide"></i></span>
												<div class="v-tooltip-box">
													<div class="v-tooltip-box-arrow">
														<ul class="tooltip-box-ul">
															<li><i class="icon {if $basic_set}icon-index-sel{else}icon-index-noSel{/if}"></i>基本设置</li>
															<li><i class="icon {if $trade_set}icon-index-sel{else}icon-index-noSel{/if}"></i>交易设置</li>
															<li><i class="icon {if $withdraw_set}icon-index-sel{else}icon-index-noSel{/if}"></i>提现设置</li>
															<li><i class="icon {if $mobile_set}icon-index-sel{else}icon-index-noSel{/if}"></i>短信通知</li>
															<li><i class="icon {if $pay_set}icon-index-sel{else}icon-index-noSel{/if}"></i>支付方式</li>
															<li><i class="icon {if $return_set}icon-index-sel{else}icon-index-noSel{/if}"></i>商家地址</li>
														</ul>
													</div>
												</div>
											</div>
										</div>
										<div>
                                            {if $basic_set && $trade_set && $withdraw_set && $mobile_set && $pay_set && $return_set}
                                            <span class="v-btn-finish"><i class="icon icon-success-l"></i> 完成</span>
                                            {else}
											<a href="{:__URL('PLATFORM_MAIN/config/sysconfig')}" class="v-btn-set">前往设置</a>
                                            {/if}
										</div>
									</div>
								</div>
							</div>
							<div class="procedure">
								<div class="step-number">
									<img src="/public/platform/images/index/2.png" alt="">
									<div class="select">
										<div class="flex">
											<div class="choose">配置物流信息</div>
											<div class="v-tooltip">
												<span class="tips-box"><i class="icon icon-index-guide"></i></span>
												<div class="v-tooltip-box">
													<div class="v-tooltip-box-arrow">
														<ul class="tooltip-box-ul">
															<li><i class="icon {if $express_company_set}icon-index-sel{else}icon-index-noSel{/if}"></i>物流公司</li>
															<li><i class="icon {if $shipping_fee_set}icon-index-sel{else}icon-index-noSel{/if}"></i>运费模板</li>
														</ul>
													</div>

												</div>
											</div>
										</div>
										<div>
											{if $express_company_set && $shipping_fee_set}
											<span class="v-btn-finish"><i class="icon icon-success-l"></i> 完成</span>
											{elseif $express_company_set}
											<a href="{:__URL('PLATFORM_MAIN/express/freighttemplatelist')}" class="v-btn-set">前往设置</a>
											{elseif $shipping_fee_set}
											<a href="{:__URL('PLATFORM_MAIN/express/expresscompany')}" class="v-btn-set">前往设置</a>
											{else}
											<a href="{:__URL('PLATFORM_MAIN/express/expresscompany')}" class="v-btn-set">前往设置</a>
											{/if}
										</div>
									</div>
								</div>
							</div>
							<div class="procedure">
								<div class="step-number">
									<img src="/public/platform/images/index/4.png" alt="">
									<div class="select">
										<div class="flex">
											<div class="choose">发布商品</div>
											<div class="v-tooltip">
												<span class="tips-box"><i class="icon icon-index-guide"></i></span>
												<div class="v-tooltip-box">
													<div class="v-tooltip-box-arrow">
														<ul class="tooltip-box-ul">
															<li><i class="icon {if $category_set}icon-index-sel{else}icon-index-noSel{/if}"></i>商品分类</li>
															<li><i class="icon {if $goods_set}icon-index-sel{else}icon-index-noSel{/if}"></i>发布商品</li>
														</ul>
													</div>

												</div>
											</div>
										</div>
										<div>
											{if $category_set && $goods_set}
											<span class="v-btn-finish"><i class="icon icon-success-l"></i> 完成</span>
											{elseif $goods_set}
											<a href="{:__URL('PLATFORM_MAIN/goods/goodscategorylist')}" class="v-btn-set">前往设置</a>
											{elseif $category_set}
											<a href="{:__URL('PLATFORM_MAIN/goods/selfgoodslist')}" class="v-btn-set">前往设置</a>
											{else}
											<a href="{:__URL('PLATFORM_MAIN/goods/goodscategorylist')}" class="v-btn-set">前往设置</a>
											{/if}
										</div>
									</div>
								</div>
							</div>
							<div class="procedure">
								<div class="step-number">
									<img src="/public/platform/images/index/5.png" alt="">
									<div class="select">
										<div class="flex">
											<div class="choose">商城装修</div>
											<div class="v-tooltip">
												<span class="tips-box"><i class="icon icon-index-guide"></i></span>
												<div class="v-tooltip-box">
													<div class="v-tooltip-box-arrow">
														<ul class="tooltip-box-ul">
															<li><i class="icon {if $custom_website_set}icon-index-sel{else}icon-index-noSel{/if}"></i>商城首页</li>
															{if $shopStatus}
															<li><i class="icon {if $custom_shop_set}icon-index-sel{else}icon-index-noSel{/if}"></i>店铺首页</li>
															{/if}
															<li><i class="icon {if $custom_member_set}icon-index-sel{else}icon-index-noSel{/if}"></i>会员中心</li>
														</ul>
													</div>

												</div>
											</div>
										</div>
										<div>
											{if $shopStatus}
											{if $custom_website_set && $custom_shop_set && $custom_member_set}
											<span class="v-btn-finish"><i class="icon icon-success-l"></i> 完成</span>
											{else}
											<a href="{:__URL('PLATFORM_MAIN/config/customtemplatelist')}" class="v-btn-set">前往设置</a>
											{/if}
											{else}
											{if $custom_website_set && $custom_member_set}
											<span class="v-btn-finish"><i class="icon icon-success-l"></i> 完成</span>
											{else}
											<a href="{:__URL('PLATFORM_MAIN/config/customtemplatelist')}" class="v-btn-set">前往设置</a>
											{/if}
											{/if}
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<!--商城助手-->
					<!--运营状况-->
					<div class="v-card-body">
						<div class="newbie mb-20 flex flex-pack-justify">
							<div class="bold">运营概况</div>
						</div>
						<div class="engage">
							<div class="payment">
								<div class="payment-one">
                                    <div class="pay-img"><img src="/public/platform/images/index/6.png" alt=""></div>
									<div class="string"></div>
									<div class="figures">
										<div class="figure">
											<div class="pay-mange">待发货订单</div>
											<div class="pay-num"><a href="{:__URL('PLATFORM_MAIN/order/orderlist')}?order_status=1" class="index-order-red">{$order_data['daifahuo']}</a></div>
										</div>
										<div class="figure">
											<div class="pay-mange">售后订单</div>
											<div class="pay-num"><a href="{:__URL('PLATFORM_MAIN/order/afterorderlist')}" class="index-order-red">{$order_data['tuikuanzhong']}</a></div>
										</div>
										<div class="figure">
											<div class="pay-mange">本月成交订单</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-red">{$order_data['complete']}</a></div>
											<div class="pay-day">上月：{$order_data['complete1']}</div>
										</div>

									 </div>
								</div>

							</div>
							<div class="payment">
								<div class="payment-one">
                                    <div class="pay-img"><img src="/public/platform/images/index/7.png" alt=""></div>
									<div class="string"></div>
									<div class="figures">
										<div class="figure">
											<div class="pay-mange">今日营业额</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-red">{$sale_data['sale_money_day1']}</a></div>
											<div class="pay-day">昨日：{$sale_data['sale_money_day2']}</div>
										</div>
										<div class="figure">
											<div class="pay-mange">今日支付订单</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-red">{$sale_data['sale_num_day1']}</a></div>
											<div class="pay-day">昨日：{$sale_data['sale_num_day2']}</div>
										</div>
										<div class="figure">
											<div class="pay-mange">支付人数</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-red">{$sale_data['sale_member_day1']}</a></div>
											<div class="pay-day">昨日：{$sale_data['sale_member_day1']}</div>
										</div>

									 </div>
								</div>

							</div>
							<div class="payment">
								<div class="payment-one">
                                    <div class="pay-img"><img src="/public/platform/images/index/8.png" alt=""></div>
									<div class="string"></div>
									<div class="figures">
										<div class="figure">
											<div class="pay-mange">新增分销商</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-blue">{$sale_data['commission_num1']}</a></div>
											<div class="pay-day">昨日：{$sale_data['commission_num2']}</div>
										</div>
										<div class="figure">
											<div class="pay-mange">待审核分销商</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-blue">{$sale_data['commission_num3']}</a></div>
										</div>
										<div class="figure">
											<div class="pay-mange">总分销商数</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-blue">{$sale_data['commission_num']}</a></div>
										</div>

									 </div>
								</div>

							</div>
							<div class="payment">
								<div class="payment-one">
                                    <div class="pay-img"><img src="/public/platform/images/index/9.png" alt=""></div>
									<div class="string"></div>
									<div class="figures">
										<div class="figure">
											<div class="pay-mange">待处理会员提现</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-blue">{$withdraws_data['member_withdraw']}</a></div>
											
										</div>
										<div class="figure">
											<div class="pay-mange">待处理佣金提现</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-blue">{$withdraws_data['commission_withdraw']}</a></div>
										</div>
										<div class="figure">
											<div class="pay-mange">本月提现佣金</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-blue">{$withdraws_data['commission1']}</a></div>
											<div class="pay-day">上月：{$withdraws_data['commission2']}</div>
										</div>

									 </div>
								</div>

							</div>
							<div class="payment">
								<div class="payment-one">
                                    <div class="pay-img"><img src="/public/platform/images/index/10.png" alt=""></div>
									<div class="string"></div>
									<div class="figures">
										<div class="figure">
											<div class="pay-mange">新增会员</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-green">{$sale_data['member_num1']}</a></div>
											<div class="pay-day">昨日:{$sale_data['member_num2']}</div>
											
										</div>
										<div class="figure">
											<div class="pay-mange">今日活跃用户</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-green">{$sale_data['visitor_num1']}</a></div>
											<div class="pay-day">昨日:{$sale_data['visitor_num2']}</div>
										</div>
										<div class="figure">
											<div class="pay-mange">总会员数</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-green">{$sale_data['member_num']}</a></div>
											
										</div>

									 </div>
								</div>

							</div>
							<div class="payment">
								<div class="payment-one">
                                    <div class="pay-img"><img src="/public/platform/images/index/11.png" alt=""></div>
									<div class="string"></div>
									<div class="figures">
										<div class="figure">
											<div class="pay-mange">出售中商品</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-green">{$goods_data['sale']}</a></div>
											
										</div>
										<div class="figure">
											<div class="pay-mange">仓库中商品</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-green">{$goods_data['store']}</a></div>
										</div>
										<div class="figure">
											<div class="pay-mange">库存预警</div>
											<div class="pay-num"><a href="javascript:void(0)" class="index-order-green">{$goods_data['warning']}</a></div>
											
										</div>

									 </div>
								</div>

							</div>


						</div>
					</div>
					<!--运营状况-->
					<!--快捷入口-->
					<div class="v-card-body">
						<div class="newbie mb-20 flex flex-pack-justify">
							<div class="bold">快捷入口</div>
						</div>
						<div class="succession">
							<div class="balance">
								<a href="{:__URL('PLATFORM_MAIN/goods/addgoods')}" class="balanceOperation">
									<img src="/public/platform/images/index/12.png" alt="">
									<div class="ml-10">发布商品</div>
								</a>
								<a href="{:__URL('PLATFORM_MAIN/config/customtemplatelist')}" class="balanceOperation">
									<img src="/public/platform/images/index/13.png" alt="">
									<div class="ml-10">商城装修</div>
								</a>
								<a href="{:__URL('PLATFORM_MAIN/wchat/config')}" class="balanceOperation">
									<img src="/public/platform/images/index/14.png" alt="">
									<div class="ml-10" style="margin-left: 9px;">公众号管理</div>
								</a>
								<a href="{:__URL('PLATFORM_MAIN/order/orderlist')}" class="balanceOperation">
									<img src="/public/platform/images/index/15.png" alt="">
									<div class="ml-10">订单管理</div>
								</a>
								<a href="{:__URL('PLATFORM_MAIN/statistics/orderDistribution')}" class="balanceOperation">
									<img src="/public/platform/images/index/16.png" alt="">
									<div class="ml-10">订单分析</div>
								</a>
								<a href="{:__URL('ADDONS_MAINdistributorList')}" class="balanceOperation">
									<img src="/public/platform/images/index/17.png" alt="">
									<div class="ml-10">分销商</div>
								</a>
								<a href="{:__URL('ADDONS_MAINformList')}" class="balanceOperation">
									<img src="/public/platform/images/index/18.png" alt="">
									<div class="ml-10">发货助手</div>
								</a>
								<a href="{:__URL('ADDONS_MAINgoodImportHelper')}" class="balanceOperation">
									<img src="/public/platform/images/index/19.png" alt="">
									<div class="ml-10">商品助手</div>
								</a>
								<a href="{:__URL('ADDONS_MAINcouponTypeList')}" class="balanceOperation">
									<img src="/public/platform/images/index/20.png" alt="">
									<div class="ml-10">优惠券</div>
								</a>
								<a href="{:__URL('ADDONS_MAINfullCutList')}" class="balanceOperation">
									<img src="/public/platform/images/index/21.png" alt="">
									<div class="ml-10">满减送</div>
								</a>
							</div>
						</div>
					</div>
					<!--快捷入口-->
					<div class="row">
						<div class="col-sm-6 pr-10">
							<div class="v-card-body">
								<div class="newbie mb-20 flex flex-pack-justify">
									<div class="bold">订单概况</div>
								</div>
								<div class="tab-content mb" style="margin-bottom: 5px">
									<div role="tabpanel" class="tab-pane fade in active" id="order" style="height: 300px;"></div>
									<div role="tabpanel" class="tab-pane fade" id="trade" style="height: 300px;"></div>
								</div>

							</div>
						</div>
						<div class="col-sm-6 tradeState pl-10">
							<div class="v-card-body">
								<div class="newbie mb-20 flex flex-pack-justify">
									<div class="bold">转化概况</div>
								</div>

								<div class="panel-body pr panel-paddings">
									<div class="left ">
										<div class="left-data">
											<div class="ts-item" style="background-color: #f2f6fd">
												<ul class="ts-item-ul clearfix">
													<li>
													<p>访客人数</p>
													<p id="visitor_num" class="index-order-red"></p>
													</li>
												</ul>

											</div>
											<div class="ts-item" style="background-color: #eff8f0">
												<ul class="ts-item-ul clearfix">
													<li>
													<p>下单买家数</p>
													<p id="order_num" class="index-order-red"></p>
													</li>
													<li>
													<p>下单金额</p>
													<p id="order_money" class="index-order-red"></p>
													</li>
												</ul>
											</div>
											<div class="ts-item" style="background-color: #fdf7ed">
												<ul class="ts-item-ul clearfix">
													<li>
													<p>支付买家数</p>
													<p id="pay_num" class="index-order-red"></p>
													</li>
													<li>
													<p>支付金额</p>
													<p id="pay_money" class="index-order-red"></p>
													</li>
													<li>
													<p>客单价</p>
													<p id="unit_price" class="index-order-red"></p>
													</li>
												</ul>
											</div>
										</div>
										<div class="left-chart">
											<div class="pr">
												<div class="rate-item1">
													<p>转化率</p>
													<p id="order_conversion" class="index-order-red"></p>
												</div>
												<div class="rate-item2">
													<p>转化率</p>
													<p id="orderpay_conversion" class="index-order-red"></p>
												</div>
												<div class="rate-item3">
													<p>转化率</p>
													<p id="pay_conversion" class="index-order-red"></p>
												</div>
											</div>
										</div>
									</div>
								</div>

							</div>
						</div>
					</div>
				   </div>
			   </div>








<input type="hidden" id="merchant_expire" value="{$merchant_expire}">
<input type="hidden" id="merchant" value="{$web_info['version']}">
{/block}

{block name="script"}
<script>
    require(['util'],function(util){
        if($("#merchant_expire").val()==1){
            var merchant = $("#merchant").val();
			var html = '';
			html += '<h2 class="text-center" style="font-size:16px;font-weight:bold">温馨提示</h2><div style="font-size: 14px;padding-top: 20px">您使用的'+merchant+'已过期!系统部分功能可能受到限制，请及时联系我们客服进行续费，以免影响商城正常运作！点击联系<a href="http://q.url.cn/s/EPvXzVm" target="_blank" class="text-primary">QQ客服</a>，电话客服：<span class="text-danger">400-889-6625</span></div>';
			util.confirmExpire('',html,function(){
				window.open("http://q.url.cn/s/EPvXzVm")
			});
		}
            getTransactionStatus(1);
            loading();

    		$('#emoji').on('click',function(){
    			util.emojiDialog(function(data){
    			})
    		})
	        $('#tips').on('click',function(){
	            util.message('删除成功','success')
	        })
	        $('#picture').on('click',function(){
	            var _this = $(this);
	            util.pictureDialog(_this,false,function(res){
	                util.message('选择了 '+res.path[0])
	            })
	        })
	        $('#icon').on('click', function () {
	            util.iconsDialog(function(data){
                    util.message('你选择了'+data)
                })
	        });
	        $('#wap_icon').on('click', function () {
	            util.wap_iconsDialog(function(data){
                    util.message('你选择了'+data)
                })
	        });
	        $('#confirm').on('click',function(){
	            util.alert('内容',function(){
	            	util.message('你点击了确定')
	            })
	        })
	        $('#material').on('click',function(){
	            util.materialDialog()
	        })
	        $('#link').on('click',function(){
	        	util.linksDialog(function(data){
	        	})
	        });
	        $('#goods').on('click',function(){
	        	util.goodsDialog(function(data){
	        	})
	        });
	        $('#shop').on('click',function(){
	        	util.shopDialog(function(data){
	        	})
	        });
        function getTransactionStatus(time) {
            $.ajax({
                type:"post",
                url : "{:__URL('PLATFORM_MAIN/index/getTransactionStatus')}",
                async : true,
                data :{'times':time},
                success : function(data) {
                    $("#vistor").html(data['visitor_num']);
                    $("#visitor_num").html(data['visitor_num']);
					$("#order_num").html(data['order_num']);
                    $("#order_money").html(data['order_money']);
                    $("#pay_num").html(data['pay_num']);
                    $("#pay_money").html(data['pay_money']);
                    $("#unit_price").html(data['unit_price']);
                    $("#order_conversion").html(data['order_conversion']);
                    $("#orderpay_conversion").html(data['orderpay_conversion']);
                    $("#pay_conversion").html(data['pay_conversion']);
                }
            });
        }
        function loading(){
            $.ajax({
                type : "post",
                url : "{:__URL('PLATFORM_MAIN/index/getOrderMovementsChartCount')}",
                async : true,
                success : function(data) {
                    var orderOption = {
                        title: {
                            subtext: '近七日自营订单走势',
							left: 'center',
							top:'20'
                        },
                        tooltip: {
                            trigger: 'axis'
                        },
                        legend: {
                            data:['订单量','付款订单','售后订单'],
							left: 'center',
                            // top: '30px',
                        },
                        grid: {
                            left: '3%',
                            right: '4%',
                            bottom: '3%',
                            containLabel: true
                        },
                        // toolbox: {
                        //     feature: {
                        //         saveAsImage: {}
                        //     }
                        // },

                        xAxis: {
                            type: 'category',
                            boundaryGap: false,
                            data: data[0]
                        },
                        yAxis: {
                            type: 'value',
							name:'数量'
                        },
                        series: [
                            {
                                name:'订单量',
                                type:'line',
                                // stack: '总量',
                                data:data[1][0]['data']
                            },
                            {
                                name:'付款订单',
                                type:'line',
                                // stack: '总量',
                                data:data[1][1]['data']
                            },
                            {
                                name:'售后订单',
                                type:'line',
                                // stack: '总量',
                                data:data[1][2]['data']
                            }
                        ]
                    };
                    util.chart('order',orderOption);
                }
            });
        }

		// 永久移除点击事件
		$("#remove").on("click",function(){
			util.alert("移除模块后，商家后台首页将不会再呈现商城助手。",function(){
				$("#mallGuide").fadeOut();
			})
		})


    })
</script>
{/block}
